package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.JwPartyRecommendatMapper;
import com.ruoyi.system.domain.JwPartyRecommendat;
import com.ruoyi.system.service.IJwPartyRecommendatService;

/**
 * 推优人员Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-06
 */
@Service
public class JwPartyRecommendatServiceImpl implements IJwPartyRecommendatService 
{
    @Autowired
    private JwPartyRecommendatMapper jwPartyRecommendatMapper;

    /**
     * 查询推优人员
     * 
     * @param prId 推优人员主键
     * @return 推优人员
     */
    @Override
    public JwPartyRecommendat selectJwPartyRecommendatByPrId(Long prId)
    {
        return jwPartyRecommendatMapper.selectJwPartyRecommendatByPrId(prId);
    }

    /**
     * 查询推优人员列表
     * 
     * @param jwPartyRecommendat 推优人员
     * @return 推优人员
     */
    @Override
    public List<JwPartyRecommendat> selectJwPartyRecommendatList(JwPartyRecommendat jwPartyRecommendat)
    {
        return jwPartyRecommendatMapper.selectJwPartyRecommendatList(jwPartyRecommendat);
    }

    /**
     * 新增推优人员
     * 
     * @param jwPartyRecommendat 推优人员
     * @return 结果
     */
    @Override
    public int insertJwPartyRecommendat(JwPartyRecommendat jwPartyRecommendat)
    {
        return jwPartyRecommendatMapper.insertJwPartyRecommendat(jwPartyRecommendat);
    }

    /**
     * 修改推优人员
     * 
     * @param jwPartyRecommendat 推优人员
     * @return 结果
     */
    @Override
    public int updateJwPartyRecommendat(JwPartyRecommendat jwPartyRecommendat)
    {
        jwPartyRecommendat.setUpdateTime(DateUtils.getNowDate());
        return jwPartyRecommendatMapper.updateJwPartyRecommendat(jwPartyRecommendat);
    }

    /**
     * 批量删除推优人员
     * 
     * @param prIds 需要删除的推优人员主键
     * @return 结果
     */
    @Override
    public int deleteJwPartyRecommendatByPrIds(Long[] prIds)
    {
        return jwPartyRecommendatMapper.deleteJwPartyRecommendatByPrIds(prIds);
    }

    /**
     * 删除推优人员信息
     * 
     * @param prId 推优人员主键
     * @return 结果
     */
    @Override
    public int deleteJwPartyRecommendatByPrId(Long prId)
    {
        return jwPartyRecommendatMapper.deleteJwPartyRecommendatByPrId(prId);
    }
}
